<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>hg.app.webapp.__init__</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>hg.app.webapp.__init__</h1>

<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#RequestHandler">RequestHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#WSGIApplication2">WSGIApplication2</a></td>
<td>Modifyed to add new methods __before__ and __after__ before the get/post/delete/etc methods and then AFTER RESPONSE.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="RequestHandler" ID="RequestHandler"></a>
<h2>RequestHandler</h2>

<h3>Derived from</h3>
RequestHandler
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#RequestHandler.__init__">RequestHandler</a></td>
<td></td>
</tr><tr>
<td><a href="#RequestHandler.__after__">__after__</a></td>
<td>This runs AFTER response is returned to browser.</td>
</tr><tr>
<td><a href="#RequestHandler.__before__">__before__</a></td>
<td>Allows common code to be used for all get/post/delete methods</td>
</tr>
</table>
<a NAME="RequestHandler.__init__" ID="RequestHandler.__init__"></a>
<h4>RequestHandler (Constructor)</h4>
<b>RequestHandler</b>(<i></i>)
<a NAME="RequestHandler.__after__" ID="RequestHandler.__after__"></a>
<h4>RequestHandler.__after__</h4>
<b>__after__</b>(<i>*args</i>)
<p>
        This runs AFTER response is returned to browser.
        If you have follow up work that you don't want to do while
        browser is waiting put it here such as sending emails etc
</p><a NAME="RequestHandler.__before__" ID="RequestHandler.__before__"></a>
<h4>RequestHandler.__before__</h4>
<b>__before__</b>(<i>*args</i>)
<p>
        Allows common code to be used for all get/post/delete methods
</p>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="WSGIApplication2" ID="WSGIApplication2"></a>
<h2>WSGIApplication2</h2>
<p>
    Modifyed to add new methods __before__ and __after__
    before the get/post/delete/etc methods and then
    AFTER RESPONSE.  This is important because it means you
    can do work after the response has been returned to the browser
</p>
<h3>Derived from</h3>
WSGIApplication
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#WSGIApplication2.__init__">WSGIApplication2</a></td>
<td>Initializes this application with the given URL mapping.</td>
</tr><tr>
<td><a href="#WSGIApplication2.__call__">__call__</a></td>
<td>Called by WSGI when a request comes in.</td>
</tr>
</table>
<a NAME="WSGIApplication2.__init__" ID="WSGIApplication2.__init__"></a>
<h4>WSGIApplication2 (Constructor)</h4>
<b>WSGIApplication2</b>(<i>url_mapping, debug=False</i>)
<p>
Initializes this application with the given URL mapping.
</p><p>
        Args:
            url_mapping: list of (URI, RequestHandler) pairs (e.g., [('/', ReqHan)])
            debug: if true, we send Python stack traces to the browser on errors
</p><a NAME="WSGIApplication2.__call__" ID="WSGIApplication2.__call__"></a>
<h4>WSGIApplication2.__call__</h4>
<b>__call__</b>(<i>environ, start_response</i>)
<p>
Called by WSGI when a request comes in.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>